<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>miniFOC: algorithm/pid.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="Acme_LOGO.png"/></td>
  <td id="projectalign">
   <div id="projectname">miniFOC<span id="projectnumber">&#160;1.0.3</span>
   </div>
   <div id="projectbrief">This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_99d3723365464dd656f512988bb8dbbd.html">algorithm</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">pid.c</div></div>
</div><!--header-->
<div class="contents">
<a href="pid_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/**************************************************************************/</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &quot;<a class="code" href="pid_8h.html">pid.h</a>&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;<a class="code" href="fast__math_8h.html">fast_math.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;<a class="code" href="system_8h.html">system.h</a>&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="pid_8c.html#a48934d9569b54761658f7fe0484db10c">   16</a></span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="pid_8c.html#a48934d9569b54761658f7fe0484db10c">pid_parameter_available_flag</a> = 1;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="pid_8c.html#a2c7bcbec66fa40a2347b1cd253a5ae82">   20</a></span><span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="pid_8c.html#a2c7bcbec66fa40a2347b1cd253a5ae82">pid_control_mode_flag</a> = 0;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">   24</a></span><span class="keyword">volatile</span> <a class="code hl_struct" href="struct_p_i_d___structure__t.html">PID_Structure_t</a> <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="pid_8c.html#aaa8f5bad87ffc78a20f06863ab6bad5c">   28</a></span><span class="keyword">volatile</span> <a class="code hl_struct" href="struct_p_i_d___structure__t.html">PID_Structure_t</a> <a class="code hl_variable" href="pid_8c.html#aaa8f5bad87ffc78a20f06863ab6bad5c">angle_pid_handler</a>;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="pid_8c.html#a58a093011af03fae7427eb1980434a5e">   33</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="pid_8c.html#a58a093011af03fae7427eb1980434a5e">pid_config</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> mode) {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    <span class="comment">/* clear the value of the PID handler */</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    <a class="code hl_function" href="system_8c.html#a7e7cece1b30ef67968b244698f999b0e">user_memset</a>((<span class="keywordtype">void</span> *) &amp;<a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>, 0x00, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="struct_p_i_d___structure__t.html">PID_Structure_t</a>));</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    <a class="code hl_function" href="system_8c.html#a7e7cece1b30ef67968b244698f999b0e">user_memset</a>((<span class="keywordtype">void</span> *) &amp;<a class="code hl_variable" href="pid_8c.html#aaa8f5bad87ffc78a20f06863ab6bad5c">angle_pid_handler</a>, 0x00, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="struct_p_i_d___structure__t.html">PID_Structure_t</a>));</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>    <span class="comment">/* update the PID closed loop flag byte */</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>    <a class="code hl_variable" href="pid_8c.html#a2c7bcbec66fa40a2347b1cd253a5ae82">pid_control_mode_flag</a> = mode;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>    <span class="comment">/* set maximum and minimum output torque */</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a466d4dab1bd38a43438c2e5e6ad5534e">maximum</a> = 1.0f;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>    <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a1fac701369b1197497f7c698ad74386d">minimum</a> = -1.0f;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>    <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a1f7add0f84d583bc2eceb290d6c4cc06">kp</a> = 0.06f;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a050993b7ca6c97e62c1020017f716b91">ki</a> = 0.08f;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#ae7a5c6018507bb1361fcca170e069b9c">kd</a> = 0.01f;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    <a class="code hl_variable" href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a51379d672c255e751fb020ef2394a8f0">sum_maximum</a> = 0;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <span class="comment">/* set maximum and minimum output speed */</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>    <a class="code hl_variable" href="pid_8c.html#aaa8f5bad87ffc78a20f06863ab6bad5c">angle_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a466d4dab1bd38a43438c2e5e6ad5534e">maximum</a> = 100.0f;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    <a class="code hl_variable" href="pid_8c.html#aaa8f5bad87ffc78a20f06863ab6bad5c">angle_pid_handler</a>.<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a1fac701369b1197497f7c698ad74386d">minimum</a> = -100.0f;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>}</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="pid_8c.html#abe6a9dce63d0eaad5a10d4c8c5ffcd07">   61</a></span><span class="keywordtype">float</span> <a class="code hl_function" href="pid_8c.html#abe6a9dce63d0eaad5a10d4c8c5ffcd07">pid_calculate_result</a>(<a class="code hl_struct" href="struct_p_i_d___structure__t.html">PID_Structure_t</a> *pid_handler, <span class="keywordtype">float</span> collect) {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <span class="comment">/* calculate PID error value */</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    <span class="keywordtype">float</span> current_result, error = pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#ad0e13a810b1a4602c1ce625f9877cbf5">expect</a> - collect;</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="comment">/* calculate the integral and realize anti integral saturation */</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>    pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">summary</a> = pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">summary</a> + error;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>    pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">summary</a> = <a class="code hl_define" href="fast__math_8h.html#a11b75b7ef242489024467ef9285dfeed">fast_constrain</a>(pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">summary</a>, pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a51379d672c255e751fb020ef2394a8f0">sum_maximum</a>, -pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a51379d672c255e751fb020ef2394a8f0">sum_maximum</a>);</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    <span class="comment">/* calculate PID output value */</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>    current_result = pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a1f7add0f84d583bc2eceb290d6c4cc06">kp</a> * error + pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a050993b7ca6c97e62c1020017f716b91">ki</a> * pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">summary</a></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>        + pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#ae7a5c6018507bb1361fcca170e069b9c">kd</a> * (error - pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a53bf2ded26ca455e1227890c20123cd9">last_error</a>);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    <span class="comment">/* Update last time error of PID to calculate the differential term */</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a53bf2ded26ca455e1227890c20123cd9">last_error</a> = error;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>    <span class="comment">/* Implementation of output limiting algorithm */</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    current_result = <a class="code hl_define" href="fast__math_8h.html#a11b75b7ef242489024467ef9285dfeed">fast_constrain</a>(current_result, pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a1fac701369b1197497f7c698ad74386d">minimum</a>, pid_handler-&gt;<a class="code hl_variable" href="struct_p_i_d___structure__t.html#a466d4dab1bd38a43438c2e5e6ad5534e">maximum</a>);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>    <span class="keywordflow">return</span> current_result;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>}</div>
<div class="ttc" id="afast__math_8h_html"><div class="ttname"><a href="fast__math_8h.html">fast_math.h</a></div><div class="ttdoc">this is the header file of fast_math.c, the macros of fast amplitude limiting algorithm and cosine fu...</div></div>
<div class="ttc" id="afast__math_8h_html_a11b75b7ef242489024467ef9285dfeed"><div class="ttname"><a href="fast__math_8h.html#a11b75b7ef242489024467ef9285dfeed">fast_constrain</a></div><div class="ttdeci">#define fast_constrain(x, low, high)</div><div class="ttdoc">fast clipping algorithm</div><div class="ttdef"><b>Definition:</b> <a href="fast__math_8h_source.html#l00020">fast_math.h:20</a></div></div>
<div class="ttc" id="apid_8c_html_a2c7bcbec66fa40a2347b1cd253a5ae82"><div class="ttname"><a href="pid_8c.html#a2c7bcbec66fa40a2347b1cd253a5ae82">pid_control_mode_flag</a></div><div class="ttdeci">volatile unsigned char pid_control_mode_flag</div><div class="ttdoc">flag variable of PID closed loop mode</div><div class="ttdef"><b>Definition:</b> <a href="pid_8c_source.html#l00020">pid.c:20</a></div></div>
<div class="ttc" id="apid_8c_html_a48934d9569b54761658f7fe0484db10c"><div class="ttname"><a href="pid_8c.html#a48934d9569b54761658f7fe0484db10c">pid_parameter_available_flag</a></div><div class="ttdeci">unsigned char pid_parameter_available_flag</div><div class="ttdoc">flag variable for PID parameter availability</div><div class="ttdef"><b>Definition:</b> <a href="pid_8c_source.html#l00016">pid.c:16</a></div></div>
<div class="ttc" id="apid_8c_html_a58a093011af03fae7427eb1980434a5e"><div class="ttname"><a href="pid_8c.html#a58a093011af03fae7427eb1980434a5e">pid_config</a></div><div class="ttdeci">void pid_config(unsigned char mode)</div><div class="ttdoc">configure pid loop parameters</div><div class="ttdef"><b>Definition:</b> <a href="pid_8c_source.html#l00033">pid.c:33</a></div></div>
<div class="ttc" id="apid_8c_html_aaa8f5bad87ffc78a20f06863ab6bad5c"><div class="ttname"><a href="pid_8c.html#aaa8f5bad87ffc78a20f06863ab6bad5c">angle_pid_handler</a></div><div class="ttdeci">volatile PID_Structure_t angle_pid_handler</div><div class="ttdoc">algorithm handler of PID angle loop</div><div class="ttdef"><b>Definition:</b> <a href="pid_8c_source.html#l00028">pid.c:28</a></div></div>
<div class="ttc" id="apid_8c_html_ab051c8f4a730b934b146f330514efd95"><div class="ttname"><a href="pid_8c.html#ab051c8f4a730b934b146f330514efd95">speed_pid_handler</a></div><div class="ttdeci">volatile PID_Structure_t speed_pid_handler</div><div class="ttdoc">algorithm handler of PID speed loop</div><div class="ttdef"><b>Definition:</b> <a href="pid_8c_source.html#l00024">pid.c:24</a></div></div>
<div class="ttc" id="apid_8c_html_abe6a9dce63d0eaad5a10d4c8c5ffcd07"><div class="ttname"><a href="pid_8c.html#abe6a9dce63d0eaad5a10d4c8c5ffcd07">pid_calculate_result</a></div><div class="ttdeci">float pid_calculate_result(PID_Structure_t *pid_handler, float collect)</div><div class="ttdoc">calculate result using sampling value</div><div class="ttdef"><b>Definition:</b> <a href="pid_8c_source.html#l00061">pid.c:61</a></div></div>
<div class="ttc" id="apid_8h_html"><div class="ttname"><a href="pid_8h.html">pid.h</a></div><div class="ttdoc">this is the header file of pid.c, which defines the structure of PID algorithm and closed-loop state ...</div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html"><div class="ttname"><a href="struct_p_i_d___structure__t.html">PID_Structure_t</a></div><div class="ttdoc">structure of PID algorithm</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00024">pid.h:24</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a050993b7ca6c97e62c1020017f716b91"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a050993b7ca6c97e62c1020017f716b91">PID_Structure_t::ki</a></div><div class="ttdeci">float ki</div><div class="ttdoc">integral term coefficient in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00026">pid.h:26</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a1f7add0f84d583bc2eceb290d6c4cc06"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a1f7add0f84d583bc2eceb290d6c4cc06">PID_Structure_t::kp</a></div><div class="ttdeci">float kp</div><div class="ttdoc">proportional term coefficient in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00025">pid.h:25</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a1fac701369b1197497f7c698ad74386d"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a1fac701369b1197497f7c698ad74386d">PID_Structure_t::minimum</a></div><div class="ttdeci">float minimum</div><div class="ttdoc">minimum output in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00031">pid.h:31</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a466d4dab1bd38a43438c2e5e6ad5534e"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a466d4dab1bd38a43438c2e5e6ad5534e">PID_Structure_t::maximum</a></div><div class="ttdeci">float maximum</div><div class="ttdoc">maximum output in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00030">pid.h:30</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a51379d672c255e751fb020ef2394a8f0"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a51379d672c255e751fb020ef2394a8f0">PID_Structure_t::sum_maximum</a></div><div class="ttdeci">float sum_maximum</div><div class="ttdoc">maximum of anti saturation integral in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00032">pid.h:32</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a53bf2ded26ca455e1227890c20123cd9"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a53bf2ded26ca455e1227890c20123cd9">PID_Structure_t::last_error</a></div><div class="ttdeci">float last_error</div><div class="ttdoc">error value of previous calculation in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00033">pid.h:33</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_a5f567aec72ce48f24c2dbc06dcfa3a09"><div class="ttname"><a href="struct_p_i_d___structure__t.html#a5f567aec72ce48f24c2dbc06dcfa3a09">PID_Structure_t::summary</a></div><div class="ttdeci">float summary</div><div class="ttdoc">value of integral term in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00028">pid.h:28</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_ad0e13a810b1a4602c1ce625f9877cbf5"><div class="ttname"><a href="struct_p_i_d___structure__t.html#ad0e13a810b1a4602c1ce625f9877cbf5">PID_Structure_t::expect</a></div><div class="ttdeci">float expect</div><div class="ttdoc">user expectations in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00029">pid.h:29</a></div></div>
<div class="ttc" id="astruct_p_i_d___structure__t_html_ae7a5c6018507bb1361fcca170e069b9c"><div class="ttname"><a href="struct_p_i_d___structure__t.html#ae7a5c6018507bb1361fcca170e069b9c">PID_Structure_t::kd</a></div><div class="ttdeci">float kd</div><div class="ttdoc">differential term coefficient in PID</div><div class="ttdef"><b>Definition:</b> <a href="pid_8h_source.html#l00027">pid.h:27</a></div></div>
<div class="ttc" id="asystem_8c_html_a7e7cece1b30ef67968b244698f999b0e"><div class="ttname"><a href="system_8c.html#a7e7cece1b30ef67968b244698f999b0e">user_memset</a></div><div class="ttdeci">void user_memset(void *buf, unsigned char data, unsigned char num)</div><div class="ttdoc">format buffer array to fixed value, replace memset function</div><div class="ttdef"><b>Definition:</b> <a href="system_8c_source.html#l00049">system.c:49</a></div></div>
<div class="ttc" id="asystem_8h_html"><div class="ttname"><a href="system_8h.html">system.h</a></div><div class="ttdoc">system basic function header file</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
